<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfLocalPublisher</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch02.html" title="Common libinfinity API">
<link rel="prev" href="InfDiscovery.html" title="InfDiscovery">
<link rel="next" href="libinfinity-0.4-InfIpAddress.html" title="InfIpAddress">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="InfDiscovery.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="libinfinity-0.4-InfIpAddress.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfLocalPublisher.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfLocalPublisher.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfLocalPublisher.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfLocalPublisher.prerequisites" class="shortcut">Prerequisites</a>
                   | 
                  <a href="#InfLocalPublisher.implementations" class="shortcut">Known Implementations</a>
</td></tr>
</table>
<div class="refentry" title="InfLocalPublisher">
<a name="InfLocalPublisher"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfLocalPublisher.top_of_page"></a>InfLocalPublisher</span></h2>
<p>InfLocalPublisher — Publish services on the local network</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="InfLocalPublisher.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libinfinity/common/inf-local-publisher.h&gt;

                    <a class="link" href="InfLocalPublisher.html#InfLocalPublisher-struct" title="InfLocalPublisher">InfLocalPublisher</a>;
                    <a class="link" href="InfLocalPublisher.html#InfLocalPublisherIface" title="InfLocalPublisherIface">InfLocalPublisherIface</a>;
                    <a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem">InfLocalPublisherItem</a>;
<a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem"><span class="returnvalue">InfLocalPublisherItem</span></a> * <a class="link" href="InfLocalPublisher.html#inf-local-publisher-publish" title="inf_local_publisher_publish ()">inf_local_publisher_publish</a>     (<em class="parameter"><code><a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a> *publisher</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfLocalPublisher.html#inf-local-publisher-unpublish" title="inf_local_publisher_unpublish ()">inf_local_publisher_unpublish</a>       (<em class="parameter"><code><a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a> *publisher</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem"><span class="type">InfLocalPublisherItem</span></a> *item</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="InfLocalPublisher.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GInterface
   +----InfLocalPublisher
</pre>
</div>
<div class="refsect1" title="Prerequisites">
<a name="InfLocalPublisher.prerequisites"></a><h2>Prerequisites</h2>
<p>
InfLocalPublisher requires
 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
</div>
<div class="refsect1" title="Known Implementations">
<a name="InfLocalPublisher.implementations"></a><h2>Known Implementations</h2>
<p>
InfLocalPublisher is implemented by
 <a class="link" href="InfDiscoveryAvahi.html" title="InfDiscoveryAvahi">InfDiscoveryAvahi</a>.</p>
</div>
<div class="refsect1" title="Description">
<a name="InfLocalPublisher.description"></a><h2>Description</h2>
<p>
<a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a> provides a common interface to publish services on the
local network.
</p>
</div>
<div class="refsect1" title="Details">
<a name="InfLocalPublisher.details"></a><h2>Details</h2>
<div class="refsect2" title="InfLocalPublisher">
<a name="InfLocalPublisher-struct"></a><h3>InfLocalPublisher</h3>
<pre class="programlisting">typedef struct _InfLocalPublisher InfLocalPublisher;</pre>
<p>
<a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a> is an opaque data type. You should only access it
via the public API functions.
</p>
</div>
<hr>
<div class="refsect2" title="InfLocalPublisherIface">
<a name="InfLocalPublisherIface"></a><h3>InfLocalPublisherIface</h3>
<pre class="programlisting">typedef struct {
} InfLocalPublisherIface;
</pre>
<p>
Virtual functions for <a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="InfLocalPublisherItem">
<a name="InfLocalPublisherItem"></a><h3>InfLocalPublisherItem</h3>
<pre class="programlisting">typedef struct _InfLocalPublisherItem InfLocalPublisherItem;</pre>
<p>
<a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem"><span class="type">InfLocalPublisherItem</span></a> is an opaque data type. You should only access it
via the public API functions.
</p>
</div>
<hr>
<div class="refsect2" title="inf_local_publisher_publish ()">
<a name="inf-local-publisher-publish"></a><h3>inf_local_publisher_publish ()</h3>
<pre class="programlisting"><a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem"><span class="returnvalue">InfLocalPublisherItem</span></a> * inf_local_publisher_publish     (<em class="parameter"><code><a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a> *publisher</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);</pre>
<p>
Publishes a service through <em class="parameter"><code>publisher</code></em> so that it can be discovered with
an appropriate <a class="link" href="InfDiscovery.html" title="InfDiscovery"><span class="type">InfDiscovery</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>publisher</code></em> :</span></p></td>
<td>A <a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>The service type to publish, such as _http._tcp.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>The name of the service.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td>
<td>The port the service is listening on.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem"><span class="type">InfLocalPublisherItem</span></a> that can be used to unpublish
the service again.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_local_publisher_unpublish ()">
<a name="inf-local-publisher-unpublish"></a><h3>inf_local_publisher_unpublish ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_local_publisher_unpublish       (<em class="parameter"><code><a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a> *publisher</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfLocalPublisher.html#InfLocalPublisherItem" title="InfLocalPublisherItem"><span class="type">InfLocalPublisherItem</span></a> *item</code></em>);</pre>
<p>
Unpublishes <em class="parameter"><code>item</code></em> so that it can no longer be found in the network.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>publisher</code></em> :</span></p></td>
<td>A <a class="link" href="InfLocalPublisher.html" title="InfLocalPublisher"><span class="type">InfLocalPublisher</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>A published item obtained from <a class="link" href="InfLocalPublisher.html#inf-local-publisher-publish" title="inf_local_publisher_publish ()"><code class="function">inf_local_publisher_publish()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="See Also">
<a name="InfLocalPublisher.see-also"></a><h2>See Also</h2>
<a class="link" href="InfDiscoveryAvahi.html" title="InfDiscoveryAvahi"><span class="type">InfDiscoveryAvahi</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>